/**
 * @filename: ToUndoState.java 2020年1月13日
 * @project match-service  V1.0
 * Copyright(c) 2020 flying-cattle Co. Ltd. 
 * All right reserved. 
 */
package com.service.business.match.service.impl;

import com.service.business.match.service.OrderStateServiceFactory;
import com.service.business.match.service.OrderStateService;
//import com.service.business.rabbitmq.binding.MatchSendHandler;
import com.service.match.common.entity.SpotOrderVo;
import com.service.match.common.enums.TradingSpotOrderState;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName: ToUndoState
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author flying-cattle
 * @date 2020年1月13日
 */
@Slf4j
@Service
public class ToUndoOrderStateServiceImpl implements OrderStateService, InitializingBean {

//	@Autowired
//	private MatchSendHandler sendService;
	
	@Override
	public void handler(SpotOrderVo order) {
		// 实现-数据库查询，看是否可以撤销
		log.info("ToUndoOrderState:{}",order);

	}

	@Override
	public void afterPropertiesSet() throws Exception {
		OrderStateServiceFactory.register(TradingSpotOrderState.TO_UNDO, this);
	}

}
